In computer graphics applications, complex shapes and objects are formed through the interconnection and rendering of more simple structures, referred to as primitives. An example of such a primitive is a triangle. Color, shading and/or texture are often added to the rendered object to make it look more realistic.
Primitives, and the attributes (i.e., color, shading, texture and other suitable attributes) they possess, are defined in part by the vertices thereof. Known techniques for shading an object, for example, include using attribute data values interpolated from the vertices of the primitive. A drawback associated with conventional interpolation techniques is that the interpolation must be performed on each individual pixel of the primitive. As interpolation is conventionally performed in hardware, this requires that many interpolation circuits be present on a single chip. The amount of real estate taken up by the interpolation circuits quickly becomes prohibitive.
In addition to the shading of the object, the angles or orientation of the rendered object on a (two-dimensional) screen is also important. Correct perspective mapping of a triangle, or other suitable primitive, requires the barycentric coordinates of each pixel to be operated on (e.g., multiplied) by corresponding weighing value at full precision. An example of such full precision calculation would be performing 32-bit arithmetic operations on every pixel of an image. Given the barycentric equation:P=Ai+Bj+C where “i” and “j” represent spatial locations, at least two 32-bit multiplications and two 32-bit additions are required to be performed on every pixel. As the number of pixels that form an image can be an arbitrarily large number, N, the number of components needed to map a perspectively correct two-dimensional image is equal to N (32-bit multipliers+32-bit adders). Each multiplier takes up valuable real estate on the integrated circuit chip upon which it is placed. Thus, the real estate penalty associated with conventional pixel attribute computation and rendering techniques is prohibitively large. Consequently, the cost of the integrated circuit chip which performs such operations may also be prohibitively large.
In addition to the space penalty discussed above, there is also a corresponding time (or efficiency) penalty associated with performing full precision calculations on each pixel of an image, as the larger the integrated circuit chip, the longer it takes the signal representing the data being operated on to be transmitted from input to output.